package cn.xz.diy_service_register.controller;

import cn.xz.diy_service_register.ajaxRes.AjaxResult;
import cn.xz.diy_service_register.pojo.RegisterVo;
import cn.xz.diy_service_register.service.IRegisterCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/serviceRegister")
public class ServiceRegisterController {

    @Autowired
    private IRegisterCenterService registerCenterService;
    @PostMapping("/register")
    public AjaxResult register(@RequestBody RegisterVo registerVo){
        return registerCenterService.register(registerVo);
    }

    @PostMapping("/find")
    public AjaxResult find(){
        return registerCenterService.find();
    }
}
